<!DOCTYPE html>
<html>
  <head>
	<title>WebAssembly in D</title>
  	<meta charset="utf-8" />
	<style>
		#stdout {
			white-space: pre;
		}
	</style>
  </head>
  <body>
    <a href="/">arsd.webassembly</a>
    <a href="http://dpldocs.info/this-week-in-d/Blog.Posted_2020_08_10.html">Learn more about this program here</a>
    <p>Please note: this code doesn't work on Safari.</p>
    <p>Also try the arrow keys and spacebar to interact with many of these programs. Tip: shift+right click can get the normal menu on the canvas.</p>
    <form method="POST"><button type="submit">Force Recompile</button></form>
    <a href="omg.d">View Source</a>

    <div id="screen"></div>

    <div id="stdout"></div>

    <script src="/webassembly-core.js"></script>
    <script>
	WebAssembly.instantiateStreaming(fetch('/omg.wasm'), importObject)
		.then(function(obj) {
			memory = obj.instance.exports.memory;
			bridge_malloc = obj.instance.exports.bridge_malloc;
			printBlockDebugInfo = obj.instance.exports.printBlockDebugInfo;
			exports = obj.instance.exports;
			obj.instance.exports._start();
		});
    </script>
  </body>
</html>
